package com.repository;

import com.entity.Letter;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

public interface LetterRepository extends JpaRepository<Letter,Integer>, JpaSpecificationExecutor<Letter> {

        Page<Letter> findAllByAddresseeId(Integer addresseeId, Pageable pageable);

        int countByAddresseeId(Integer addresseeId);

}
